import flask_restful
from flask import Blueprint
from manager.app.event import action

api_robot_bp = Blueprint('robot', __name__)

'''
========= api =========
'''


class doActionCTRL(flask_restful.Resource):
    def post(self,action_name,paras):
        result={}
        if action_name =='screenshot':
            jobid = action.doScreenShot(paras.get('app_id'))
            result['status'] = 'success'
            result['code'] = '200'
            result['jobid']= jobid

        return project.to_dict()
